{template Public:Admin:header}

<div class="row">
  <div class="col-lg-12">
    <div class="table-toolbar">
      <div class="row">
        <div class="col-lg-12">
          <div class="text-right"> </div>
        </div>
      </div>
      <div class="row">
        <div>
          <form action="{echo U($module.'/'.CONTROLLER_NAME.'/index')}">
          <div class="row">
          <div class="col-lg-12">
            <div class="col-lg-2">
              <input name="id" type="text" class="form-control" placeholder="任务ID" value="{if !empty($selectarray['id'])}{echo $selectarray['id']}{/if}"/>
            </div>
            <div class="col-lg-2">
              <input name="uid" type="text" class="form-control" placeholder="用户UID" value="{if !empty($selectarray['uid'])}{echo $selectarray['uid']}{/if}"/>
            </div>
            <div class="col-lg-2">
              <input name="cid" type="text" class="form-control" placeholder="订单ID" value="{if !empty($selectarray['cid'])}{echo $selectarray['cid']}{/if}"/>
            </div>
            <div class="col-lg-2">
              <input name="subject" type="text"  class="form-control" placeholder="标题" value="{if !empty($selectarray['subject'])}{echo $selectarray['subject']}{/if}"/>
            </div>
            
             <div class="col-lg-4">
             <label class="col-lg-2">发布时间</label>
            <input name="dateline1" placeholder="YYYY-MM-DD" type="text" class="form-control col-lg-5 dateline" size="10" value="{if !empty($sqlkey['dateline1'])}{echo $sqlkey['dateline1']}{/if}" style="width:110px; margin-right:10px;"/> <input name="dateline2" type="text" placeholder="YYYY-MM-DD" class="form-control col-lg-5 dateline" size="10" value="{if !empty($sqlkey['dateline2'])}{echo $sqlkey['dateline2']}{/if}" style="width:110px;"/>
              </div>
            
            </div>
            </div>
            
            <div class="row" style="padding-top:8px;">
            <div class="col-lg-12">
            <div class="col-lg-2">
              <select name="task_mode" class="form-control">
                <option value=""{if !$selectarray['task_mode'] && $selectarray['task_mode']!=0} selected="selected"{/if}>交易类型</option>
                <option value="1"{if $selectarray['task_mode']==1} selected="selected"{/if}>悬赏</option>
                <option value="2"{if $selectarray['task_mode']==2} selected="selected"{/if}>招标</option>
                <option value="3"{if $selectarray['task_mode']==3} selected="selected"{/if}>雇用</option>
              </select>
              
            </div>
            <div class="col-lg-2">
              <select name="process" class="form-control">
                <option value=""{if !$_GET['process'] && !IsNum($_GET['process'])} selected="selected"{/if}>任务流程</option>
                <option value="3"{if $selectarray['process']==3} selected="selected"{/if}>待审核</option>
                <option value="4"{if $selectarray['process']==4} selected="selected"{/if}>进行中</option>
                <option value="5"{if $selectarray['process']==5} selected="selected"{/if}>暂投稿中</option>
                <option value="8"{if $selectarray['process']==8} selected="selected"{/if}>结束</option>  
                <option value="9"{if $selectarray['process']==9} selected="selected"{/if}>关闭</option>  
              </select>   
            </div>
            
            <div class="col-lg-2">
              <select name="process_order" class="form-control">
                <option value=""{if !$_GET['process_order'] && !IsNum($_GET['process_order'])} selected="selected"{/if}>交易流程</option>
                <option value="0"{if $_GET['process_order']==0 && IsNum($_GET['process_order'])} selected="selected"{/if}>待托管赏金</option>
                <option value="1"{if $selectarray['process_order']==1} selected="selected"{/if}>进行中</option>
                <option value="2"{if $selectarray['process_order']==2} selected="selected"{/if}>待选稿</option>
                <option value="4"{if $selectarray['process_order']==4} selected="selected"{/if}>待确认付款</option>
                <option value="5"{if $selectarray['process_order']==5} selected="selected"{/if}>待评价</option>
                <option value="6"{if $selectarray['process_order']==6} selected="selected"{/if}>交易成功</option>  
              </select>   
            </div>
            
             <div class="col-lg-3">
             <div class="btn-group">
                        <a href="javascript:void(0);" class="btn btn-default" id="CategoryNanme">{if !empty($category['category_name_1'])}{if $category['category_name_3']}{echo $category['category_name_3']} > {/if}{echo $category['category_name_2']} > {echo $category['category_name_1']}{else}请选择分类{/if}</a>
                        <a href="javascript:void(0);" data-toggle="dropdown" class="btn btn-default  dropdown-toggle"><i class="fa fa-angle-down"></i></a>
                        <ul class="dropdown-menu" id="TaskCategory" style="z-index:1001"></ul>
              </div>
              
              
               <input class="btn btn-default btn-azure" name="搜索" type="submit" value="搜索" />
              <input type="hidden" name="search" value="1" />
              
              </div>
              
              <input type="hidden" name="catid" id="Catid" value="{if !empty($selectarray['catid'])}{echo $selectarray['catid']}{/if}"/>
              
              <script>							
				$(function(){
		 			 SetFormCategory(AURL+"/js/foxphp_json_task_category.js",'#TaskCategory');
				 });
		 	  </script>
            
            <!--
            <div class="col-lg-4">
            
				<script type="text/javascript" src="{echo AURL}/js/jquery_cityselect.js"></script><script type="text/javascript" src="{echo AURL}/js/foxphp_json_city_all.js"></script>
        
                    <div class="input-group" id="city_1">					  
                                    <select class="prov"></select> 
                                    <select class="city" disabled="disabled"></select>
                                    <select class="dist" disabled="disabled"></select>
                    </div>
        
                                
                                
                <script type="text/javascript">$(function(){$("#city_1").citySelect({prov:$("#ProvId").val(),city:$("#CityId").val(),dist:$("#DistId").val(),nodata:"none"});});</script>
                <input type="hidden" id="ProvId" name="provid" AUTOCOMPLETE="off"  value="{if !empty($_GET["provid"])}{echo intval($_GET["provid"])}{else}1{/if}">
                <input type="hidden" id="CityId" name="cityid" AUTOCOMPLETE="off"  value="{if !empty($_GET["cityid"])}{echo intval($_GET["cityid"])}{else}37{/if}">
                <input type="hidden" id="DistId" name="distid" AUTOCOMPLETE="off"  value="{if !empty($_GET["distid"])}{echo intval($_GET["distid"])}{else}567{/if}">
           
               
            </div>
            -->

            </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<form method="post" id="SubmitForm" action="{echo U($module.'/'.CONTROLLER_NAME.'/operate')}">
<div role="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
  
  <table id="editabledatatable" class="table table-striped table-hover table-bordered dataTable no-footer" aria-describedby="editabledatatable_info">
    <thead>
      <tr role="row">
        <th class="sorting_disabled" rowspan="1" colspan="1" style="width:38px"><div class="checkbox">
              <label>
                <input type="checkbox" id="CheckAll" style="display:none">
                <span class="text"></span></label>
            </div></th>
            
          {foreach $orderarr $key=>$value}
          <th onClick="window.location.href='{echo U($module.'/'.CONTROLLER_NAME.'/index/sqlorder/'.$key.'/iforder/'.$iforder.'/p/'.$pagenum)}'" tabindex="0" aria-controls="editabledatatable" rowspan="1" colspan="1"  aria-sort="ascending" aria-label="{echo $value['name']}" {if $key==$sqlorder} {if $iforder==2}  class="sorting_desc"{else} class="sorting_asc"{/if}{else} class="sorting"{/if}> {echo $value['name']} </th>
          {/foreach}
          
          
        <th class="sorting_disabled" rowspan="1" colspan="1"> </th>
      </tr>
    </thead>
    <tbody>
    
    {if $list}    
    {foreach $list $key=>$value}
    <tr>
      <td style="width:38px;">
      		<div class="checkbox" style="margin:0px;padding:0px;">
            <label style="margin:0px;padding:0px;">
              <input type="checkbox" name="checkbox[]" value="{echo $value['id']}">
              <span class="text checkbox"></span></label>
          </div>
     </td>
     <td>{echo $value['id']}</td>
     <td><a href="/task/{echo $value['id']}" target="_blank">{echo $value['subject']}</a>{if $value['serviceuid']>0}<span style="color:#06C">[{echo $value['serviceuid']}号客服代选]</span>{/if}{if $value['top']>0}<span class="label label-danger">推荐</span>{/if}</td>
    <td>{if $value['task_number']==1}{if $value['task_mode']==1}悬赏{else}招标{/if}{else}计件{/if}</td>
    <td>{echo $value['uid']}</td>
    <td><a href="/space/{echo $value['uid']}" target="_blank" title="{echo $value['username']}">{echo $value['username']}</a></td>
    <td>{echo $value['category_name_3']} {echo $value['category_name_2']} {echo $value['category_name_1']}</td>
    <td><span class="color_f60">￥{echo $value['money']/100}</span></td>
    <td>{echo $value['task_number']}</td>
    <td>{if $value['cid']>0}<span class="label label-success">已托管 订单号 {echo $value['cid']}</span>{else}<span class="label label-default">未托管</span>{/if}</td>
    <td>{echo $value['process_order_name']}</td>
    <td>{echo $value['phone']}</td>
    <td>{if $value['top']>0}推荐{/if}</td>
    <td>{echo FormatDate("Y/m/d H:i:s",$value['endtime'])}</td>
    <td>{echo FormatDate("Y/m/d H:i:s",$value['dateline'])}</td>
    <td>
     {if $value['process']==1}<span class="label label-default">待支付托管金</span>
     {elseif $value['process']==2}<span class="label label-default">已支付托管金(悬赏)</span>
     {elseif $value['process']==3}<span class="label label-default">待审核</span>
     {elseif $value['process']==4}<span class="label label-success">进行中</span>
     {elseif $value['process']==5}<span class="label label-default">暂投稿中</span>
     {elseif $value['process']==6}<span class="label label-default">待选稿中</span>
     {elseif $value['process']==7}<span class="label label-default">退款中</span>
     {elseif $value['process']==8}<span class="label label-default">结束</span>
     {else}<span class="label label-default">关闭</span>{/if}
     </td>
    
      <td class=" "><a class="btn btn-info btn-xs edit" href="{echo U($module.'/task/edit/id/'.$value['id'])}"><i class="fa fa-edit"></i> 编辑</a>  <a class="btn btn-danger btn-xs delete" href="javascript:void(0)" onclick="ConfirmDelete({echo $value['id']},'{echo U($module.'/'.CONTROLLER_NAME.'/delete/id/'.$value['id'])}')"><i class="fa fa-trash-o"></i> 删除</a></td>
    </tr>
    {/foreach}
    
    {/if}
      </tbody>
    
  </table>
  <div class="row DTTTFooter">
    <div class="col-sm-6">
      <div class="dataTables_info" id="simpledatatable_info" role="alert" aria-live="polite" aria-relevant="all">总共{echo $count}条数据</div>
    </div>
    <div class="col-sm-6">
      <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
        <ul class="pagination">
          {if $page}{echo $page}{/if}
        </ul>
      </div>
    </div>
  </div>
</div>


  <div class="padding_20 text-center">
    
    <input name="Verify" type="submit" value="审核" class="btn btn-default shiny"/> <input name="CloseVerify" type="submit"value="取消审核" class="btn btn-default shiny"/>  <input name="ListTop" type="submit" value="推荐" class="btn btn-default shiny"/> <input name="TopClose" type="submit" value="取消推荐" class="btn btn-default shiny"/> <input name="Delay" type="submit" value="延期" class="btn btn-default shiny"/> <input name="RefundClose" type="submit" value="退款关闭" class="btn btn-default shiny"/> <input name="Close" type="submit" value="关闭" class="btn btn-default shiny"/> <input  name="Delete" type="submit" value="删除" id="confirm" class="btn btn-danger shiny"/>
  </div>
  
</form>

{template Public:Admin:footer}